import { request } from '@/utils/request';
import type { RoleResult } from '@/api/admin/model/roleModel';

const Api = {
  RoleQuery: '/admin.role/query',
  RoleSave: '/admin.role/save',
  RoleDelete: '/admin.role/delete',
};

export function getRole() {
  return request.get<RoleResult>({
    url: Api.RoleQuery,
  });
}

export function saveRole(data: any) {
  return request.post({
    url: Api.RoleSave,
    params: data,
  });
}

export function deleteRole(data: any) {
  return request.post({
    url: Api.RoleDelete,
    params: data,
  });
}
